package controller;

import java.util.ArrayList;

import dao.impl.HouseDaoImpl;
import entity.House;
import service.impl.HouseServiceImpl;

public class HouseController {
	
	private HouseServiceImpl hsi = new HouseServiceImpl();

	public boolean save(House t) {
		return hsi.save(t);
	}

	public boolean delete(House t) {
		return hsi.delete(t);
	}

	public House selectById(int id) {
		return hsi.selectById(id);
	}

	public ArrayList<House> selectAll() {
		return hsi.selectAll();
	}

	public boolean rent(House house) {
		return hsi.rent(house);
	}

	public boolean back(House house) {
		return hsi.back(house);
	}

	public ArrayList<House> selectByPrice(int lowerPrice, int highPrice) {
		return hsi.selectByPrice(lowerPrice, highPrice);
	}

	public ArrayList<House> selectNoRent() {
		return hsi.selectNoRent();
	}

	public ArrayList<House> sortByPrice() {
		return hsi.sortByPrice();
	}

}
